var t = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t) {
    return typeof t;
} : function(t) {
    return t && "function" == typeof Symbol && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
};

!function(e) {
    if ("object" === ("undefined" == typeof exports ? "undefined" : t(exports)) && "undefined" != typeof module) module.exports = e(); else if ("function" == typeof define && define.amd) define([], e); else {
        ("undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : this).Raven = e();
    }
}(function() {
    return function t(e, r, n) {
        function i(a, s) {
            if (!r[a]) {
                if (!e[a]) {
                    var l = "function" == typeof require && require;
                    if (!s && l) return l(a, !0);
                    if (o) return o(a, !0);
                    var u = new Error("Cannot find module '" + a + "'");
                    throw u.code = "MODULE_NOT_FOUND", u;
                }
                var c = r[a] = {
                    exports: {}
                };
                e[a][0].call(c.exports, function(t) {
                    var r = e[a][1][t];
                    return i(r || t);
                }, c, c.exports, t, e, r, n);
            }
            return r[a].exports;
        }
        for (var o = "function" == typeof require && require, a = 0; a < n.length; a++) i(n[a]);
        return i;
    }({
        1: [ function(t, e, r) {
            function n(t) {
                this.name = "RavenConfigError", this.message = t;
            }
            (n.prototype = new Error()).constructor = n, e.exports = n;
        }, {} ],
        2: [ function(t, e, r) {
            e.exports = {
                wrapMethod: function(t, e, r) {
                    var n = t[e], i = t;
                    if (e in t) {
                        var o = "warn" === e ? "warning" : e;
                        t[e] = function() {
                            var t = [].slice.call(arguments), a = "" + t.join(" "), s = {
                                level: o,
                                logger: "console",
                                extra: {
                                    arguments: t
                                }
                            };
                            "assert" === e ? !1 === t[0] && (a = "Assertion failed: " + (t.slice(1).join(" ") || "console.assert"), 
                            s.extra.arguments = t.slice(1), r && r(a, s)) : r && r(a, s), n && Function.apply.call(n, i, t);
                        };
                    }
                }
            };
        }, {} ],
        3: [ function(e, r, n) {
            (function(n) {
                function i() {
                    return +new Date();
                }
                function o(t, e) {
                    return l(e) ? function(r) {
                        return e(r, t);
                    } : e;
                }
                function a() {
                    this._hasJSON = !("object" !== ("undefined" == typeof JSON ? "undefined" : t(JSON)) || !JSON.stringify), 
                    this._hasDocument = !s(B), this._hasNavigator = !s(F), this._lastCapturedException = null, 
                    this._lastData = null, this._lastEventId = null, this._globalServer = null, this._globalKey = null, 
                    this._globalProject = null, this._globalContext = {}, this._globalOptions = {
                        logger: "javascript",
                        ignoreErrors: [],
                        ignoreUrls: [],
                        whitelistUrls: [],
                        includePaths: [],
                        crossOrigin: "anonymous",
                        collectWindowErrors: !0,
                        maxMessageLength: 0,
                        maxUrlLength: 250,
                        stackTraceLimit: 50,
                        autoBreadcrumbs: !0,
                        instrument: !0,
                        sampleRate: 1
                    }, this._ignoreOnError = 0, this._isRavenInstalled = !1, this._originalErrorStackTraceLimit = Error.stackTraceLimit, 
                    this._originalConsole = I.console || {}, this._originalConsoleMethods = {}, this._plugins = [], 
                    this._startTime = i(), this._wrappedBuiltIns = [], this._breadcrumbs = [], this._lastCapturedEvent = null, 
                    this._keypressTimeout, this._location = I.location, this._lastHref = this._location && this._location.href, 
                    this._resetBackoff();
                    for (var e in this._originalConsole) this._originalConsoleMethods[e] = this._originalConsole[e];
                }
                function s(t) {
                    return void 0 === t;
                }
                function l(t) {
                    return "function" == typeof t;
                }
                function u(t) {
                    return "[object String]" === P.toString.call(t);
                }
                function c(t) {
                    for (var e in t) return !1;
                    return !0;
                }
                function f(t, e) {
                    var r, n;
                    if (s(t.length)) for (r in t) d(t, r) && e.call(null, r, t[r]); else if (n = t.length) for (r = 0; r < n; r++) e.call(null, r, t[r]);
                }
                function h(t, e) {
                    return e ? (f(e, function(e, r) {
                        t[e] = r;
                    }), t) : t;
                }
                function p(t) {
                    return !!Object.isFrozen && Object.isFrozen(t);
                }
                function g(t, e) {
                    return !e || t.length <= e ? t : t.substr(0, e) + "…";
                }
                function d(t, e) {
                    return P.hasOwnProperty.call(t, e);
                }
                function _(t) {
                    for (var e, r = [], n = 0, i = t.length; n < i; n++) u(e = t[n]) ? r.push(e.replace(/([.*+?^=!:${}()|\[\]\/\\])/g, "\\$1")) : e && e.source && r.push(e.source);
                    return new RegExp(r.join("|"), "i");
                }
                function v(t) {
                    var e = [];
                    return f(t, function(t, r) {
                        e.push(encodeURIComponent(t) + "=" + encodeURIComponent(r));
                    }), e.join("&");
                }
                function m(t) {
                    var e = t.match(/^(([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);
                    if (!e) return {};
                    var r = e[6] || "", n = e[8] || "";
                    return {
                        protocol: e[2],
                        host: e[4],
                        path: e[5],
                        relative: e[5] + r + n
                    };
                }
                function b() {
                    var t = I.crypto || I.msCrypto;
                    if (!s(t) && t.getRandomValues) {
                        var e = new Uint16Array(8);
                        t.getRandomValues(e), e[3] = 4095 & e[3] | 16384, e[4] = 16383 & e[4] | 32768;
                        var r = function(t) {
                            for (var e = t.toString(16); e.length < 4; ) e = "0" + e;
                            return e;
                        };
                        return r(e[0]) + r(e[1]) + r(e[2]) + r(e[3]) + r(e[4]) + r(e[5]) + r(e[6]) + r(e[7]);
                    }
                    return "xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx".replace(/[xy]/g, function(t) {
                        var e = 16 * Math.random() | 0;
                        return ("x" === t ? e : 3 & e | 8).toString(16);
                    });
                }
                function y(t, e) {
                    return !!(!!t ^ !!e);
                }
                function x(t, e) {
                    return !y(t, e) && (t = t.values[0], e = e.values[0], t.type === e.type && t.value === e.value && w(t.stacktrace, e.stacktrace));
                }
                function w(t, e) {
                    if (y(t, e)) return !1;
                    var r = t.frames, n = e.frames;
                    if (r.length !== n.length) return !1;
                    for (var i, o, a = 0; a < r.length; a++) if (i = r[a], o = n[a], i.filename !== o.filename || i.lineno !== o.lineno || i.colno !== o.colno || i.function !== o.function) return !1;
                    return !0;
                }
                function k(t, e, r, n) {
                    var i = t[e];
                    t[e] = r(i), n && n.push([ t, e, i ]);
                }
                var E = e("../vendor/TraceKit/tracekit"), S = e("../vendor/json-stringify-safe/stringify"), O = e("./configError"), C = e("./utils"), R = C.isError, T = C.isObject, j = e("./console").wrapMethod, D = "source protocol user pass host port path".split(" "), U = /^(?:(\w+):)?\/\/(?:(\w+)(:\w+)?@)?([\w\.-]+)(?::(\d+))?(\/.*)/, I = "undefined" != typeof window ? window : void 0 !== n ? n : "undefined" != typeof self ? self : {}, B = I.document, F = I.navigator;
                a.prototype = {
                    VERSION: "0.0.7",
                    debug: !1,
                    TraceKit: E,
                    config: function(t, e) {
                        var r = this;
                        if (r._globalServer) return this._logDebug("error", "Error: Raven has already been configured"), 
                        r;
                        if (!t) return r;
                        var n = r._globalOptions;
                        e && f(e, function(t, e) {
                            "tags" === t || "extra" === t || "user" === t ? r._globalContext[t] = e : n[t] = e;
                        }), r.setDSN(t), n.ignoreErrors.push(/^Script error\.?$/), n.ignoreErrors.push(/^Javascript error: Script error\.? on line 0$/), 
                        n.ignoreErrors = _(n.ignoreErrors), n.ignoreUrls = !!n.ignoreUrls.length && _(n.ignoreUrls), 
                        n.whitelistUrls = !!n.whitelistUrls.length && _(n.whitelistUrls), n.includePaths = _(n.includePaths), 
                        n.maxBreadcrumbs = Math.max(0, Math.min(n.maxBreadcrumbs || 100, 100));
                        var i = {
                            xhr: !1,
                            console: !0,
                            dom: !1,
                            location: !1
                        }, o = n.autoBreadcrumbs;
                        "[object Object]" === {}.toString.call(o) ? o = h(i, o) : !1 !== o && (o = i), n.autoBreadcrumbs = o;
                        var a = {
                            tryCatch: !0
                        }, s = n.instrument;
                        return "[object Object]" === {}.toString.call(s) ? s = h(a, s) : !1 !== s && (s = a), 
                        n.instrument = s, E.collectWindowErrors = !!n.collectWindowErrors, r;
                    },
                    install: function() {
                        var t = this;
                        return t.isSetup() && !t._isRavenInstalled && (E.report.subscribe(function() {
                            t._handleOnErrorStackInfo.apply(t, arguments);
                        }), t._globalOptions.instrument && t._globalOptions.instrument.tryCatch && t._instrumentTryCatch(), 
                        t._globalOptions.autoBreadcrumbs && t._instrumentBreadcrumbs(), t._drainPlugins(), 
                        this.installWeapp(), t._isRavenInstalled = !0), Error.stackTraceLimit = t._globalOptions.stackTraceLimit, 
                        this;
                    },
                    installWeapp: function() {
                        var t = this;
                        wx.getSystemInfo({
                            success: function(e) {
                                t.setTagsContext({
                                    device: e.model,
                                    system: e.system,
                                    WXversion: e.version,
                                    SDKversion: e.SDKVersion
                                });
                            }
                        }), wx.getNetworkType({
                            success: function(e) {
                                t.setTagsContext({
                                    network: e.networkType
                                });
                            }
                        });
                    },
                    setDSN: function(t) {
                        var e = this, r = e._parseDSN(t), n = r.path.lastIndexOf("/"), i = r.path.substr(1, n);
                        e._dsn = t, e._globalKey = r.user, e._globalSecret = r.pass && r.pass.substr(1), 
                        e._globalProject = r.path.substr(n + 1), e._globalServer = e._getGlobalServer(r), 
                        e._globalEndpoint = e._globalServer + "/" + i + "api/" + e._globalProject + "/store/", 
                        this._resetBackoff();
                    },
                    context: function(t, e, r) {
                        return l(t) && (r = e || [], e = t, t = void 0), this.wrap(t, e).apply(this, r);
                    },
                    wrap: function(t, e, r) {
                        function n() {
                            var n = [], o = arguments.length, a = !t || t && !1 !== t.deep;
                            for (r && l(r) && r.apply(this, arguments); o--; ) n[o] = a ? i.wrap(t, arguments[o]) : arguments[o];
                            try {
                                return e.apply(this, n);
                            } catch (e) {
                                throw i._ignoreNextOnError(), i.captureException(e, t), e;
                            }
                        }
                        var i = this;
                        if (s(e) && !l(t)) return t;
                        if (l(t) && (e = t, t = void 0), !l(e)) return e;
                        try {
                            if (e.__raven__) return e;
                            if (e.__raven_wrapper__) return e.__raven_wrapper__;
                        } catch (t) {
                            return e;
                        }
                        for (var o in e) d(e, o) && (n[o] = e[o]);
                        return n.prototype = e.prototype, e.__raven_wrapper__ = n, n.__raven__ = !0, n.__inner__ = e, 
                        n;
                    },
                    uninstall: function() {
                        return E.report.uninstall(), this._restoreBuiltIns(), Error.stackTraceLimit = this._originalErrorStackTraceLimit, 
                        this._isRavenInstalled = !1, this;
                    },
                    captureException: function(t, e) {
                        if ("[object String]" === Object.prototype.toString.call(t) && -1 !== t.indexOf("thirdScriptError")) {
                            var r = t.split("\n");
                            (t = new Error(r[1])).name = r[0], r.shift(), r.shift(), t.stack = r.join("\n");
                        }
                        if (!R(t)) return this.captureMessage(t, h({
                            trimHeadFrames: 1,
                            stacktrace: !0
                        }, e));
                        this._lastCapturedException = t;
                        try {
                            var n = E.computeStackTrace(t);
                            this._handleStackInfo(n, e);
                        } catch (e) {
                            if (t !== e) throw e;
                        }
                        return this;
                    },
                    captureMessage: function(t, e) {
                        if (!this._globalOptions.ignoreErrors.test || !this._globalOptions.ignoreErrors.test(t)) {
                            var r = h({
                                message: t + ""
                            }, e = e || {});
                            if (this._globalOptions.stacktrace || e && e.stacktrace) {
                                var n;
                                try {
                                    throw new Error(t);
                                } catch (t) {
                                    n = t;
                                }
                                n.name = null, e = h({
                                    fingerprint: t,
                                    trimHeadFrames: (e.trimHeadFrames || 0) + 1
                                }, e);
                                var i = E.computeStackTrace(n), o = this._prepareFrames(i, e);
                                r.stacktrace = {
                                    frames: o.reverse()
                                };
                            }
                            return this._send(r), this;
                        }
                    },
                    captureBreadcrumb: function(t) {
                        var e = h({
                            timestamp: i() / 1e3
                        }, t);
                        if (l(this._globalOptions.breadcrumbCallback)) {
                            var r = this._globalOptions.breadcrumbCallback(e);
                            if (T(r) && !c(r)) e = r; else if (!1 === r) return this;
                        }
                        return this._breadcrumbs.push(e), this._breadcrumbs.length > this._globalOptions.maxBreadcrumbs && this._breadcrumbs.shift(), 
                        this;
                    },
                    addPlugin: function(t) {
                        var e = [].slice.call(arguments, 1);
                        return this._plugins.push([ t, e ]), this._isRavenInstalled && this._drainPlugins(), 
                        this;
                    },
                    setUserContext: function(t) {
                        return this._globalContext.user = t, this;
                    },
                    setExtraContext: function(t) {
                        return this._mergeContext("extra", t), this;
                    },
                    setTagsContext: function(t) {
                        return this._mergeContext("tags", t), this;
                    },
                    clearContext: function() {
                        return this._globalContext = {}, this;
                    },
                    getContext: function() {
                        return JSON.parse(S(this._globalContext));
                    },
                    setEnvironment: function(t) {
                        return this._globalOptions.environment = t, this;
                    },
                    setRelease: function(t) {
                        return this._globalOptions.release = t, this;
                    },
                    setDataCallback: function(t) {
                        var e = this._globalOptions.dataCallback;
                        return this._globalOptions.dataCallback = o(e, t), this;
                    },
                    setBreadcrumbCallback: function(t) {
                        var e = this._globalOptions.breadcrumbCallback;
                        return this._globalOptions.breadcrumbCallback = o(e, t), this;
                    },
                    setShouldSendCallback: function(t) {
                        var e = this._globalOptions.shouldSendCallback;
                        return this._globalOptions.shouldSendCallback = o(e, t), this;
                    },
                    setTransport: function(t) {
                        return this._globalOptions.transport = t, this;
                    },
                    lastException: function() {
                        return this._lastCapturedException;
                    },
                    lastEventId: function() {
                        return this._lastEventId;
                    },
                    isSetup: function() {
                        return !!this._hasJSON && (!!this._globalServer || (this.ravenNotConfiguredError || (this.ravenNotConfiguredError = !0, 
                        this._logDebug("error", "Error: Raven has not been configured.")), !1));
                    },
                    afterLoad: function() {
                        var t = I.RavenConfig;
                        t && this.config(t.dsn, t.config).install();
                    },
                    _ignoreNextOnError: function() {
                        var t = this;
                        this._ignoreOnError += 1, setTimeout(function() {
                            t._ignoreOnError -= 1;
                        });
                    },
                    _triggerEvent: function(t, e) {
                        var r, n;
                        if (this._hasDocument) {
                            e = e || {}, t = "raven" + t.substr(0, 1).toUpperCase() + t.substr(1), B.createEvent ? (r = B.createEvent("HTMLEvents")).initEvent(t, !0, !0) : (r = B.createEventObject()).eventType = t;
                            for (n in e) d(e, n) && (r[n] = e[n]);
                            if (B.createEvent) B.dispatchEvent(r); else try {
                                B.fireEvent("on" + r.eventType.toLowerCase(), r);
                            } catch (t) {}
                        }
                    },
                    _captureUrlChange: function(t, e) {
                        var r = m(this._location.href), n = m(e), i = m(t);
                        this._lastHref = e, r.protocol === n.protocol && r.host === n.host && (e = n.relative), 
                        r.protocol === i.protocol && r.host === i.host && (t = i.relative), this.captureBreadcrumb({
                            category: "navigation",
                            data: {
                                to: e,
                                from: t
                            }
                        });
                    },
                    _instrumentTryCatch: function() {
                        function t(t) {
                            return function(r, n) {
                                for (var i = new Array(arguments.length), o = 0; o < i.length; ++o) i[o] = arguments[o];
                                var a = i[0];
                                return l(a) && (i[0] = e.wrap(a)), t.apply ? t.apply(this, i) : t(i[0], i[1]);
                            };
                        }
                        var e = this, r = e._wrappedBuiltIns;
                        k(I, "setTimeout", t, r), k(I, "setInterval", t, r), I.requestAnimationFrame && k(I, "requestAnimationFrame", function(t) {
                            return function(r) {
                                return t(e.wrap(r));
                            };
                        }, r);
                    },
                    _instrumentBreadcrumbs: function() {
                        var t = this, e = this._globalOptions.autoBreadcrumbs, r = t._wrappedBuiltIns, n = I.chrome, i = !(n && n.app && n.app.runtime) && I.history && history.pushState;
                        if (e.location && i) {
                            var o = I.onpopstate;
                            I.onpopstate = function() {
                                var e = t._location.href;
                                if (t._captureUrlChange(t._lastHref, e), o) return o.apply(this, arguments);
                            }, k(history, "pushState", function(e) {
                                return function() {
                                    var r = arguments.length > 2 ? arguments[2] : void 0;
                                    return r && t._captureUrlChange(t._lastHref, r + ""), e.apply(this, arguments);
                                };
                            }, r);
                        }
                        if (e.console && console && console.log) {
                            var a = function(e, r) {
                                t.captureBreadcrumb({
                                    message: e,
                                    level: r.level,
                                    category: "console"
                                });
                            };
                            f([ "debug", "info", "warn", "error", "log" ], function(t, e) {
                                j(console, e, a);
                            });
                        }
                    },
                    _restoreBuiltIns: function() {
                        for (var t; this._wrappedBuiltIns.length; ) {
                            var e = (t = this._wrappedBuiltIns.shift())[0], r = t[1], n = t[2];
                            e[r] = n;
                        }
                    },
                    _drainPlugins: function() {
                        var t = this;
                        f(this._plugins, function(e, r) {
                            var n = r[0], i = r[1];
                            n.apply(t, [ t ].concat(i));
                        });
                    },
                    _parseDSN: function(t) {
                        var e = U.exec(t), r = {}, n = 7;
                        try {
                            for (;n--; ) r[D[n]] = e[n] || "";
                        } catch (e) {
                            throw new O("Invalid DSN: " + t);
                        }
                        if (r.pass && !this._globalOptions.allowSecretKey) throw new O("Do not specify your secret key in the DSN. See: http://bit.ly/raven-secret-key");
                        return r;
                    },
                    _getGlobalServer: function(t) {
                        var e = "//" + t.host + (t.port ? ":" + t.port : "");
                        return t.protocol && (e = t.protocol + ":" + e), e;
                    },
                    _handleOnErrorStackInfo: function() {
                        this._ignoreOnError || this._handleStackInfo.apply(this, arguments);
                    },
                    _handleStackInfo: function(t, e) {
                        var r = this._prepareFrames(t, e);
                        this._triggerEvent("handle", {
                            stackInfo: t,
                            options: e
                        }), this._processException(t.name, t.message, t.url, t.lineno, r, e);
                    },
                    _prepareFrames: function(t, e) {
                        var r = this, n = [];
                        if (t.stack && t.stack.length && (f(t.stack, function(e, i) {
                            var o = r._normalizeFrame(i, t.url);
                            o && n.push(o);
                        }), e && e.trimHeadFrames)) for (var i = 0; i < e.trimHeadFrames && i < n.length; i++) n[i].in_app = !1;
                        return n = n.slice(0, this._globalOptions.stackTraceLimit);
                    },
                    _normalizeFrame: function(t, e) {
                        var r = {
                            filename: t.url,
                            lineno: t.line,
                            colno: t.column,
                            function: t.func || "?"
                        };
                        return t.url || (r.filename = e), r.in_app = !(this._globalOptions.includePaths.test && !this._globalOptions.includePaths.test(r.filename) || /(Raven|TraceKit)\./.test(r.function) || /raven\.(min\.)?js$/.test(r.filename)), 
                        r;
                    },
                    _processException: function(t, e, r, n, i, o) {
                        var a;
                        if ((!this._globalOptions.ignoreErrors.test || !this._globalOptions.ignoreErrors.test(e)) && (e += "", 
                        i && i.length ? (r = i[0].filename || r, i.reverse(), a = {
                            frames: i
                        }) : r && (a = {
                            frames: [ {
                                filename: r,
                                lineno: n,
                                in_app: !0
                            } ]
                        }), (!this._globalOptions.ignoreUrls.test || !this._globalOptions.ignoreUrls.test(r)) && (!this._globalOptions.whitelistUrls.test || this._globalOptions.whitelistUrls.test(r)))) {
                            var s = h({
                                exception: {
                                    values: [ {
                                        type: t,
                                        value: e,
                                        stacktrace: a
                                    } ]
                                },
                                culprit: r
                            }, o);
                            this._send(s);
                        }
                    },
                    _trimPacket: function(t) {
                        var e = this._globalOptions.maxMessageLength;
                        if (t.message && (t.message = g(t.message, e)), t.exception) {
                            var r = t.exception.values[0];
                            r.value = g(r.value, e);
                        }
                        var n = t.request;
                        return n && (n.url && (n.url = g(n.url, this._globalOptions.maxUrlLength)), n.Referer && (n.Referer = g(n.Referer, this._globalOptions.maxUrlLength))), 
                        t.breadcrumbs && t.breadcrumbs.values && this._trimBreadcrumbs(t.breadcrumbs), t;
                    },
                    _trimBreadcrumbs: function(t) {
                        for (var e, r, n, i = [ "to", "from", "url" ], o = 0; o < t.values.length; ++o) if ((r = t.values[o]).hasOwnProperty("data") && T(r.data) && !p(r.data)) {
                            n = h({}, r.data);
                            for (var a = 0; a < i.length; ++a) e = i[a], n.hasOwnProperty(e) && n[e] && (n[e] = g(n[e], this._globalOptions.maxUrlLength));
                            t.values[o].data = n;
                        }
                    },
                    _getHttpData: function() {
                        var t = {};
                        t.headers = {
                            "User-Agent": "weapp"
                        };
                        var e = getCurrentPages();
                        return e && e.length && (t.url = e[e.length - 1].route), t;
                    },
                    _resetBackoff: function() {
                        this._backoffDuration = 0, this._backoffStart = null;
                    },
                    _shouldBackoff: function() {
                        return this._backoffDuration && i() - this._backoffStart < this._backoffDuration;
                    },
                    _isRepeatData: function(t) {
                        var e = this._lastData;
                        return !(!e || t.message !== e.message || t.culprit !== e.culprit) && (t.stacktrace || e.stacktrace ? w(t.stacktrace, e.stacktrace) : !t.exception && !e.exception || x(t.exception, e.exception));
                    },
                    _setBackoffState: function(t) {
                        if (!this._shouldBackoff()) {
                            var e = t.status;
                            if (400 === e || 401 === e || 429 === e) {
                                var r;
                                try {
                                    r = t.getResponseHeader("Retry-After"), r = 1e3 * parseInt(r, 10);
                                } catch (t) {}
                                this._backoffDuration = r || (2 * this._backoffDuration || 1e3), this._backoffStart = i();
                            }
                        }
                    },
                    _send: function(t) {
                        var e = this._globalOptions, r = {
                            project: this._globalProject,
                            logger: e.logger,
                            platform: "javascript"
                        }, n = this._getHttpData();
                        n && (r.request = n), t.trimHeadFrames && delete t.trimHeadFrames, (t = h(r, t)).tags = h(h({}, this._globalContext.tags), t.tags), 
                        t.extra = h(h({}, this._globalContext.extra), t.extra), t.extra["session:duration"] = i() - this._startTime, 
                        this._breadcrumbs && this._breadcrumbs.length > 0 && (t.breadcrumbs = {
                            values: [].slice.call(this._breadcrumbs, 0)
                        }), c(t.tags) && delete t.tags, this._globalContext.user && (t.user = this._globalContext.user), 
                        e.environment && (t.environment = e.environment), e.release && (t.release = e.release), 
                        e.serverName && (t.server_name = e.serverName), l(e.dataCallback) && (t = e.dataCallback(t) || t), 
                        t && !c(t) && (l(e.shouldSendCallback) && !e.shouldSendCallback(t) || (this._shouldBackoff() ? this._logDebug("warn", "Raven dropped error due to backoff: ", t) : "number" == typeof e.sampleRate ? Math.random() < e.sampleRate && this._sendProcessedPayload(t) : this._sendProcessedPayload(t)));
                    },
                    _getUuid: function() {
                        return b();
                    },
                    _sendProcessedPayload: function(t, e) {
                        var r = this, n = this._globalOptions;
                        if (this.isSetup()) if (t = this._trimPacket(t), this._globalOptions.allowDuplicates || !this._isRepeatData(t)) {
                            this._lastEventId = t.event_id || (t.event_id = this._getUuid()), this._lastData = t, 
                            this._logDebug("debug", "Raven about to send:", t);
                            var i = {
                                sentry_version: "7",
                                sentry_client: "raven-weapp/" + this.VERSION,
                                sentry_key: this._globalKey
                            };
                            this._globalSecret && (i.sentry_secret = this._globalSecret);
                            var o = t.exception && t.exception.values[0];
                            this.captureBreadcrumb({
                                category: "sentry",
                                message: o ? (o.type ? o.type + ": " : "") + o.value : t.message,
                                event_id: t.event_id,
                                level: t.level || "error"
                            });
                            var a = this._globalEndpoint;
                            (n.transport || this._makeRequest).call(this, {
                                url: a,
                                auth: i,
                                data: t,
                                options: n,
                                onSuccess: function() {
                                    r._resetBackoff(), r._triggerEvent("success", {
                                        data: t,
                                        src: a
                                    }), e && e();
                                },
                                onError: function(n) {
                                    r._logDebug("error", "Raven transport failed to send: ", n), n.request && r._setBackoffState(n.request), 
                                    r._triggerEvent("failure", {
                                        data: t,
                                        src: a
                                    }), n = n || new Error("Raven send failed (no additional details provided)"), e && e(n);
                                }
                            });
                        } else this._logDebug("warn", "Raven dropped repeat event: ", t);
                    },
                    _makeRequest: function(t) {
                        "production" === this._globalOptions.environment && wx.request({
                            url: t.url + "?" + v(t.auth),
                            method: "POST",
                            header: {
                                "content-type": "text/plain;charset=UTF-8"
                            },
                            data: S(t.data),
                            success: function() {
                                t.onSuccess && t.onSuccess();
                            },
                            fail: function(e) {
                                t.onError && t.onError(e);
                            }
                        });
                    },
                    _logDebug: function(t) {
                        this._originalConsoleMethods[t] && this.debug && Function.apply.call(this._originalConsoleMethods[t], this._originalConsole, [].slice.call(arguments, 1));
                    },
                    _mergeContext: function(t, e) {
                        s(e) ? delete this._globalContext[t] : this._globalContext[t] = h(this._globalContext[t] || {}, e);
                    }
                };
                var P = Object.prototype;
                "undefined" != typeof __DEV__ && __DEV__ && (a.utils = {
                    isUndefined: s,
                    isFunction: l,
                    isString: u,
                    isObject: T,
                    isEmptyObject: c,
                    isError: R,
                    each: f,
                    objectMerge: h,
                    truncate: g,
                    hasKey: d,
                    joinRegExp: _,
                    urlencode: v,
                    uuid4: b,
                    parseUrl: m,
                    fill: k
                }), a.prototype.setUser = a.prototype.setUserContext, a.prototype.setReleaseContext = a.prototype.setRelease, 
                r.exports = a;
            }).call(this, "undefined" != typeof global ? global : "undefined" != typeof self ? self : "undefined" != typeof window ? window : {});
        }, {
            "../vendor/TraceKit/tracekit": 6,
            "../vendor/json-stringify-safe/stringify": 7,
            "./configError": 1,
            "./console": 2,
            "./utils": 5
        } ],
        4: [ function(t, e, r) {
            (function(r) {
                var n = t("./raven"), i = "undefined" != typeof window ? window : void 0 !== r ? r : "undefined" != typeof self ? self : {}, o = i.Raven, a = new n();
                a.noConflict = function() {
                    return i.Raven = o, a;
                }, a.afterLoad(), e.exports = a;
            }).call(this, "undefined" != typeof global ? global : "undefined" != typeof self ? self : "undefined" != typeof window ? window : {});
        }, {
            "./raven": 3
        } ],
        5: [ function(e, r, n) {
            r.exports = {
                isObject: function(e) {
                    return "object" === (void 0 === e ? "undefined" : t(e)) && null !== e;
                },
                isError: function(t) {
                    switch (Object.prototype.toString.call(t)) {
                      case "[object Error]":
                      case "[object Exception]":
                      case "[object DOMException]":
                        return !0;

                      default:
                        return t instanceof Error;
                    }
                },
                wrappedCallback: function(t) {
                    return function(e, r) {
                        var n = t(e) || e;
                        return r ? r(n) || n : n;
                    };
                }
            };
        }, {} ],
        6: [ function(t, e, r) {
            (function(r) {
                var n = t("../../src/utils"), i = {
                    collectWindowErrors: !0,
                    debug: !1
                }, o = "undefined" != typeof window ? window : void 0 !== r ? r : "undefined" != typeof self ? self : {}, a = [].slice, s = "?", l = /^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/, u = function() {
                    var t = getCurrentPages();
                    return t && t.length ? t[t.length - 1].route : "";
                };
                i.report = function() {
                    function t(t, e) {
                        var r = null;
                        if (!e || i.collectWindowErrors) {
                            for (var n in d) if (d.hasOwnProperty(n)) try {
                                d[n].apply(null, [ t ].concat(a.call(arguments, 2)));
                            } catch (t) {
                                r = t;
                            }
                            if (r) throw r;
                        }
                    }
                    function e(e, r, o, a, c) {
                        if (m) i.computeStackTrace.augmentStackTraceWithInitialElement(m, r, o, e), f(); else if (c && n.isError(c)) t(i.computeStackTrace(c), !0); else {
                            var h, g = {
                                url: r,
                                line: o,
                                column: a
                            }, d = void 0, _ = e;
                            "[object String]" === {}.toString.call(e) && (h = e.match(l)) && (d = h[1], _ = h[2]), 
                            g.func = s, t({
                                name: d,
                                message: _,
                                url: u(),
                                stack: [ g ]
                            }, !0);
                        }
                        return !!p && p.apply(this, arguments);
                    }
                    function r() {
                        g || (p = o.onerror, o.onerror = e, g = !0);
                    }
                    function c() {
                        g && (o.onerror = p, g = !1, p = void 0);
                    }
                    function f() {
                        var e = m, r = _;
                        _ = null, m = null, v = null, t.apply(null, [ e, !1 ].concat(r));
                    }
                    function h(t, e) {
                        var r = a.call(arguments, 1);
                        if (m) {
                            if (v === t) return;
                            f();
                        }
                        var n = i.computeStackTrace(t);
                        if (m = n, v = t, _ = r, setTimeout(function() {
                            v === t && f();
                        }, n.incomplete ? 2e3 : 0), !1 !== e) throw t;
                    }
                    var p, g, d = [], _ = null, v = null, m = null;
                    return h.subscribe = function(t) {
                        r(), d.push(t);
                    }, h.unsubscribe = function(t) {
                        for (var e = d.length - 1; e >= 0; --e) d[e] === t && d.splice(e, 1);
                    }, h.uninstall = function() {
                        c(), d = [];
                    }, h;
                }(), i.computeStackTrace = function() {
                    function t(t) {
                        if (void 0 !== t.stack && t.stack) {
                            for (var e, r, n, i = /^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|eval|webpack|<anonymous>|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i, o = /\((\S*)(?::(\d+))(?::(\d+))\)/, a = t.stack.split("\n"), l = [], c = (/^(.*) is undefined$/.exec(t.message), 
                            0), f = a.length; c < f; ++c) if (r = i.exec(a[c])) {
                                var h = r[2] && 0 === r[2].indexOf("native");
                                r[2] && 0 === r[2].indexOf("eval") && (e = o.exec(r[2])) && (r[2] = e[1], r[3] = e[2], 
                                r[4] = e[3]), !(n = {
                                    url: h ? null : r[2],
                                    func: r[1] || s,
                                    args: h ? [ r[2] ] : [],
                                    line: r[3] ? +r[3] : null,
                                    column: r[4] ? +r[4] : null
                                }).func && n.line && (n.func = s), l.push(n);
                            }
                            return l.length ? {
                                name: t.name,
                                message: t.message,
                                url: u(),
                                stack: l
                            } : null;
                        }
                    }
                    function e(t, e, r, n) {
                        var i = {
                            url: e,
                            line: r
                        };
                        if (i.url && i.line) {
                            if (t.incomplete = !1, i.func || (i.func = s), t.stack.length > 0 && t.stack[0].url === i.url) {
                                if (t.stack[0].line === i.line) return !1;
                                if (!t.stack[0].line && t.stack[0].func === i.func) return t.stack[0].line = i.line, 
                                !1;
                            }
                            return t.stack.unshift(i), t.partial = !0, !0;
                        }
                        return t.incomplete = !0, !1;
                    }
                    function r(t, o) {
                        for (var a, l, c = /function\s+([_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*)?\s*\(/i, f = [], h = {}, p = !1, g = r.caller; g && !p; g = g.caller) if (g !== n && g !== i.report) {
                            if (l = {
                                url: null,
                                func: s,
                                line: null,
                                column: null
                            }, g.name ? l.func = g.name : (a = c.exec(g.toString())) && (l.func = a[1]), void 0 === l.func) try {
                                l.func = a.input.substring(0, a.input.indexOf("{"));
                            } catch (t) {}
                            h["" + g] ? p = !0 : h["" + g] = !0, f.push(l);
                        }
                        o && f.splice(0, o);
                        var d = {
                            name: t.name,
                            message: t.message,
                            url: u(),
                            stack: f
                        };
                        return e(d, t.sourceURL || t.fileName, t.line || t.lineNumber, t.message || t.description), 
                        d;
                    }
                    function n(e, n) {
                        var o = null;
                        n = null == n ? 0 : +n;
                        try {
                            if (o = t(e)) return o;
                        } catch (t) {
                            if (i.debug) throw t;
                        }
                        try {
                            if (o = r(e, n + 1)) return o;
                        } catch (t) {
                            if (i.debug) throw t;
                        }
                        return {
                            name: e.name,
                            message: e.message,
                            url: u()
                        };
                    }
                    return n.augmentStackTraceWithInitialElement = e, n.computeStackTraceFromStackProp = t, 
                    n;
                }(), e.exports = i;
            }).call(this, "undefined" != typeof global ? global : "undefined" != typeof self ? self : "undefined" != typeof window ? window : {});
        }, {
            "../../src/utils": 5
        } ],
        7: [ function(t, e, r) {
            function n(t, e) {
                for (var r = 0; r < t.length; ++r) if (t[r] === e) return r;
                return -1;
            }
            function i(t, e) {
                var r = [], i = [];
                return null == e && (e = function(t, e) {
                    return r[0] === e ? "[Circular ~]" : "[Circular ~." + i.slice(0, n(r, e)).join(".") + "]";
                }), function(o, a) {
                    if (r.length > 0) {
                        var s = n(r, this);
                        ~s ? r.splice(s + 1) : r.push(this), ~s ? i.splice(s, 1 / 0, o) : i.push(o), ~n(r, a) && (a = e.call(this, o, a));
                    } else r.push(a);
                    return null == t ? a : t.call(this, o, a);
                };
            }
            (e.exports = function(t, e, r, n) {
                return JSON.stringify(t, i(e, n), r);
            }).getSerialize = i;
        }, {} ]
    }, {}, [ 4 ])(4);
});